Theory of Computation


Q61.

CFG (Context Free Grammar) is not closed under:
GateOverflow

Q62.

A CFG G is given with the following productions where S is the start symbol, A is a non-terminal and a and b are terminals.\begin{array}{l} S \rightarrow a S \mid A \\ A \rightarrow a A b|b A a| \epsilon \end{array}Which of the following strings is generated by the grammar above?
GateOverflow

Q63.

Which of the following statements about parser is/are CORRECT? I. Canonical LR is more powerful than SLR. II. SLR is more powerful than LALR III. SLR is more powerful than Canonical LR.
GateOverflow

Q64.

Identify the language generated by the following grammar, where S is start variable. S\rightarrow XY X\rightarrow aX|a Y \rightarrowaYb|\in
GateOverflow

Q65.

In the context-free grammar below, S is the start symbol, a and b are terminals, and \epsilon denotes the empty string. S \to aSAb \mid \epsilon A \to bA \mid \epsilon The grammar generates the language
GateOverflow

Q66.

In the context-free grammar below, S is the start symbol, a and b are terminals, and\epsilon denotes the empty string S \rightarrow aSa \mid bSb \mid a \mid b \mid \epsilon Which of the following strings is NOT generated by the grammar?
GateOverflow

Q67.

Consider the following statements about the context-free grammer G=\{S\rightarrow SS, S\rightarrow ab, S\rightarrow ba, S\rightarrow \varepsilon \} 1. G is ambiguous 2. G produces all strings with equal number of a's and b's 3. G can be accepted by a deterministic PDA. Which combination below expresses all the true statements about G?
GateOverflow

Q68.

Which one of the following statements is FALSE?
GateOverflow

Q69.

Which of the following grammar rules violate the requirements of an operator grammar? P, Q, R are nonterminals, and r,s,t are terminals. (i)P\rightarrow QR (ii)P\rightarrow QsR (iii)P\rightarrow \varepsilon (iv)P\rightarrow QtRr
GateOverflow

Q70.

Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?
GateOverflow